-- GENERATED SPELL FOR [Sunblade Warlock] --


function spell0_24686(pUnit, Event) --@Fel Armor,Self--
pUnit:FullCastSpellOnTarget(44520,pUnit)
pUnit:RegisterEvent('Sorts_24686', 606, 1)
end

function spell1_24686(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(44518,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24686', 23000, 1)
end

function spell2_24686(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(46042,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24686', 23000, 1)
end

function spell3_24686(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(44519,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24686', 2000, 1)
end

function spell4_24686(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(46043,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24686', 2000, 1)
end

function spell5_24686(pUnit, Event) --@Summon Sunblade Imp,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(44517,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_24686', 1, 1)
end

function spell6_24686(pUnit, Event) --@Summon Sunblade Imp,Self--
pUnit:FullCastSpellOnTarget(48320,pUnit)
pUnit:RegisterEvent('Sorts_24686', 606, 1)
end

function Sorts_24686(pUnit, Event)
local choix_sorts_24686 = math.random(0, 6)
if choix_sorts_24686 == 0 then
pUnit:RegisterEvent('spell0_24686', 1, 1)
end
if choix_sorts_24686 == 1 then
pUnit:RegisterEvent('spell1_24686', 1, 1)
end
if choix_sorts_24686 == 2 then
pUnit:RegisterEvent('spell2_24686', 1, 1)
end
if choix_sorts_24686 == 3 then
pUnit:RegisterEvent('spell3_24686', 1, 1)
end
if choix_sorts_24686 == 4 then
pUnit:RegisterEvent('spell4_24686', 1, 1)
end
if choix_sorts_24686 == 5 then
pUnit:RegisterEvent('spell5_24686', 1, 1)
end
if choix_sorts_24686 == 6 then
pUnit:RegisterEvent('spell6_24686', 1, 1)
end
end

function mob24686_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24686', math.random(1500, 3000), 1)
end

function mob24686_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24686_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24686_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24686, 1, 'mob24686_Action')
RegisterUnitEvent(24686, 2, 'mob24686_Leave')
RegisterUnitEvent(24686, 3, 'mob24686_Kill')
RegisterUnitEvent(24686, 4, 'mob24686_Die')
